#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	float a = 0.0, b = 0.0, c = 0.0;
	scanf("%f %f", &a, &b);
	c = 2 * b - a;
	printf("%f", c);
	return 0;
}